<template>
    <div>
        这是教程的详情页
        <p v-for="(item,idx) in detailData" :key="idx">{{item.title}}</p>
    </div>
</template>

<script>
import { getCourseDetail } from '@/api'
export default {
    data(){
        return {
            detailData: []
        }
    },
    created() {
        getCourseDetail(this.$route.params.id).then(res=>{
            this.detailData = res.data.data.datas;
            // this.detailData.sort((a,b)=>a.id - b.id);
            console.log(this.detailData)

        })
    },
}
</script>